﻿using System;
using System.Collections.Generic;

namespace YJ.Data.Interface
{
    public interface IWorkFlow
    {
        /// <summary>
        /// 新增
        /// </summary>
        int Add(YJ.Data.Model.WorkFlow model);

        /// <summary>
        /// 更新
        /// </summary>
        int Update(YJ.Data.Model.WorkFlow model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        List<YJ.Data.Model.WorkFlow> GetAll();

        /// <summary>
        /// 查询单条记录
        /// </summary>
        Model.WorkFlow Get(Guid id);

        /// <summary>
        /// 删除
        /// </summary>
        int Delete(Guid id);

        /// <summary>
        /// 查询记录条数
        /// </summary>
        long GetCount();

        /// <summary>
        /// 查询所有类型
        /// </summary>
        List<string> GetAllTypes();

        /// <summary>
        /// 查询所有ID和名称
        /// </summary>
        Dictionary<Guid, string> GetAllIDAndName();

        /// <summary>
        /// 查询所有记录
        /// </summary>
        List<YJ.Data.Model.WorkFlow> GetByTypes(string typeString);

        /// <summary>
        /// 查询一页数据
        /// </summary>
        /// <param name="pager"></param>
        /// <param name="query"></param>
        /// <param name="userid"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        List<Data.Model.WorkFlow> GetPagerData(out string pager, string query = "", string userid = "", string typeid = "", string name = "", int pagesize = 15);

        /// <summary>
        /// 查询一页数据
        /// </summary>
        /// <param name="count"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageNumber"></param>
        /// <param name="userid"></param>
        /// <param name="typeid"></param>
        /// <param name="name"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        List<Data.Model.WorkFlow> GetPagerData(out long count, int pageSize, int pageNumber, string userid = "", string typeid = "", string name = "", string order = "");
    }
}
